IsShowContextualMenuClick
NEW WITH CONTEXTUAL MENUS
Determines whether a particular event could invoke a contextual menu.
pascal Boolean IsShowContextualMenuClick(const EventRecord* inEvent);
inEvent
- A pointer to the event structure that describes the event to examine.
- function result
- Returns a Boolean value indicating whether or not a contextual menu should be displayed. If
true
, the contextual menu should be displayed; iffalse
, not.DISCUSSION
Before calling theIsShowContextualMenuClick
function, you should callInitContextualMenus
. If no error is returned, you can then callIsShowContextualMenuClick
.Applications should call
IsShowContextualMenuClick
when they receive non-null events. IfIsShowContextualMenuClick
returnstrue
, your application should generate its own menu and Apple Event descriptor (AEDesc
), and then callContextualMenuSelect
to display and track the contextual menu, and then handle the user's choice.If the mouse-down event did not invoke a contextual menu, then the application should check to see if the event occurred in the menu bar (using the
FindWindow
function) and, if so, callMenuSelect
to allow the user to choose a command from the menu bar.SEE ALSO
"Contextual Menu Gestalt Selector Constants".